<template>
    <div>
        <div id="jh_video_play"></div>
    </div>
</template>

<script>
    export default {
        name: "Videokc",
        data() {
            return {}
        },
        mounted() {
            let obj = this.$route.query

            this.$HTTP.video({
                video: obj.videoId,
                course: obj.id
            }).then(res => {
                console.log(res)
                this.videos(res.data.data.token, res.data.data.video_id)
            })
        },
        methods: {
            videos(token, id) {
                var player = new bjcPlayer('#jh_video_play', {
                    token: token,
                    definition: 'low', // hign 高清 low 低清
                    media: "video"
                });

                player.play(id);
            }
        },
        filters: {},
        watch: {}
    }
</script>

<style>
    #jh_video_play {
        height: 500px;
    }
</style>